﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BusinessHandler
{
    public class AdvertisementCategoryController : AdvertisementDataContext
    {
        private static AdvertisementCategoryController instance;
        public static AdvertisementCategoryController Instance
        {
            get
            {
                if (instance==null)
                {
                    instance=new AdvertisementCategoryController();

                }
                return instance;

            }
            set
            {
                instance=value;
            }
        }
        public List<AdvertisementCategory> GetCategoryList(bool status)
        {
            AdvertisementDataContext datacontext=new AdvertisementDataContext();
            List<AdvertisementCategory> catList=(from o in datacontext.AdvertisementCategories
                                                 where o.AdvStatus==status
                                                 select o).ToList();
            return catList;
        }
    }
}